<?php

require_once 'PipesImpl/Config.php';

class PipesCore_Helpers_TagUri
{
	private $_base_uri = '';
	public function __construct(PipesImpl_Config $config) {
		$this->_base_uri = $config->base_uri;
	}

	public function factory($tag) {
		$uri = str_replace($this->_base_uri, '', $_SERVER['REQUEST_URI']);
		$explodedUri = explode('/', $uri);
		$uri = "{$this->_base_uri}{$explodedUri[0]}/browse/tag/{$tag}";
		return $uri;
	}
}

